import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
   
    {
      path: '/',
      name: 'home',
      component: () => import('../components/home/MyHome.vue')
    }, 
    {
      path: '/login',
      name: 'login',
      component: () => import('../components/login/MyLogin.vue')
    },
    {
      path: '/classify',
      name: 'classify',
      component: () => import('../components/home/MyClassify.vue'),
      children: [
        {
        path:'/classify/classify1',
        name: 'classify1',
        component: () => import('@/components/home/MyClassifychild/MyClassify1.vue')
        },
        {
          path:'/classify/classify2',
          name: 'classify2',
          component: () => import('@/components/home/MyClassifychild/MyClassify2.vue')
        },
        {
          path:'/classify/classify3',
          name: 'classify3',
          component: () => import('@/components/home/MyClassifychild/MyClassify3.vue')
        },
        {
          path:'/classify/classify4',
          name: 'classify4',
          component: () => import('@/components/home/MyClassifychild/MyClassify4.vue')
          },
          {
            path:'/classify/classify5',
            name: 'classify5',
            component: () => import('@/components/home/MyClassifychild/MyClassify5.vue')
            }
      ]
    },
    {
      path: '/life',
      name: 'life',
      component: () => import('../components/home/MyLife.vue')
    },
    {
      path: '/car',
      name: 'car',
      component: () => import('../components/home/MyCar.vue')
    },
    {
      path: '/mine',
      name: 'mine',
      component: () => import('../components/home/MyMine.vue')
    },
    {
      path: '/detail',
      name: 'detail',
      component: () => import('../components/child/MyDetails.vue')
    }
    ,
    {
      path:'/message',
      name:'message',
      component: () => import('../components/home/MyMessage.vue')
    },
    {
      path:'/chat',
      name:'chat',
      component: () => import('../components/child/MyChat.vue')
    }
  ]
})

export default router
